Skip to content

Requires Ruby 3.2.0 or higher #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 11, 2025
Merged

Conversation

acronhub
Copy link
Contributor

@acronhub acronhub commented Jun 10, 2025

What

  • Require Ruby version >= 3.2.0.
  • Run CI tests using the active Ruby versions.
  • Remove unused Bundler installation.

@Copilot Copilot AI review requested due to automatic review settings June 10, 2025 03:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the required Ruby version to 3.2.8 or higher to ensure compatibility with newer Ruby and Bundler releases.

  • Updated the Ruby version requirement in README.md
  • Logged the new Ruby requirement in CHANGELOG.md
  • Updated the CI configuration in .github/workflows/rspec.yml by setting ruby-version to '3.2.8' and removing an unnecessary bundler installation step

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
README.md Updated Ruby version requirement note to 3.2.8 or higher
CHANGELOG.md Added changelog entry for requiring Ruby 3.2.8 or higher
.github/workflows/rspec.yml Changed ruby-version to '3.2.8' and removed bundler installation for versions < 2.0

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @acronhub, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

Hello! gemini-code-assist here, providing a summary of this pull request. The main intent of this PR, as indicated by the title and description, is to update the minimum required Ruby version for this project. Specifically, it raises the requirement from Ruby 3.0.0 or higher to Ruby 3.2.8 or higher. This change is motivated by the fact that older Ruby versions (3.0.0 and below) have reached End-of-Life (EOL). The changes primarily involve updating documentation files to reflect this new requirement.

Highlights

  • Ruby Version Requirement: The minimum required Ruby version for the project has been updated from 3.0.0 or higher to 3.2.8 or higher.
  • Documentation Updates: The CHANGELOG.md and README.md files have been updated to reflect the new Ruby version requirement.

Changelog

  • CHANGELOG.md
    • Added an entry under the 'Unreleased' section noting the new Ruby version requirement (3.2.8 or higher).
  • README.md
    • Updated the installation note to state that Ruby 3.2.8 or higher is now required.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to update the minimum required Ruby version to 3.2.8, which is a commendable step as it moves away from EOL Ruby versions. The updates to CHANGELOG.md and README.md clearly communicate this new requirement.

However, a critical component for enforcing this requirement is missing: the qiita.gemspec file has not been updated. To ensure that the gem actually requires Ruby 3.2.8 or higher, you'll need to add spec.required_ruby_version = '>= 3.2.8' (or a similar constraint like spec.required_ruby_version = '~> 3.2.8') to the qiita.gemspec file. Without this, the stated requirement is merely informational and won't prevent users with older Ruby versions from attempting to install or use the gem, potentially leading to runtime errors.

Please address this by modifying the qiita.gemspec file. I've also added a couple of specific comments on the existing changes.

Summary of Findings

  • Missing Ruby Version Enforcement in Gemspec: The qiita.gemspec file lacks the spec.required_ruby_version declaration. This is critical for enforcing the new Ruby 3.2.8 requirement. Without it, the changes are purely documentary.
  • Specificity of Ruby Patch Version: The requirement for Ruby 3.2.8 specifically (as opposed to 3.2.0 or 3.2) might be overly restrictive if not justified by features/fixes unique to that patch. Consider if a broader 3.2.x compatibility is feasible.

Merge Readiness

This pull request is a good initiative to modernize the Ruby version requirement. However, as it stands, it's not ready for merging due to a critical omission: the qiita.gemspec file must be updated to include spec.required_ruby_version. This change is essential to technically enforce the new Ruby version. I recommend addressing this, along with considering the point about the specificity of the patch version, before merging. I am unable to approve the pull request myself; please ensure further review and approval after these changes are made.

README.md Outdated
@@ -7,7 +7,7 @@ Qiita API v2 client library and CLI tool, written in Ruby.

## Install

Note: requires Ruby 3.0.0 or higher.
Note: requires Ruby 3.2.8 or higher.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Updating the README to reflect the new Ruby version requirement is good for user visibility.

However, for this requirement to be effective and prevent installation on incompatible Ruby versions, it needs to be declared in the qiita.gemspec file. Could you please ensure that spec.required_ruby_version = '>= 3.2.8' (or a similar appropriate constraint like ~> 3.2.8 if you want to cap it at < 3.3) is added to qiita.gemspec? Without this, the note here is purely informational and doesn't provide technical enforcement.

CHANGELOG.md Outdated
@@ -1,5 +1,7 @@
## Unreleased

- Require Ruby 3.2.8 or higher

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This changelog entry is clear. Just a thought: is Ruby 3.2.8 a specific minimum patch version chosen for a particular reason (e.g., a critical bug fix or feature only available in 3.2.8 and not in earlier 3.2.x patches)?

Often, Ruby version requirements are set to a minor version like >= 3.2.0 or ~> 3.2.0 to allow users flexibility with patch versions while ensuring compatibility with the 3.2 series. If there isn't a strict dependency on features/fixes exclusive to 3.2.8, would specifying >= 3.2.0 (or simply >= 3.2) be more accommodating for users while still achieving the goal of using a modern Ruby version?

@acronhub acronhub requested a review from atm-snag2 June 10, 2025 04:03
@acronhub acronhub changed the title Requires Ruby 3.2.8 or higher Requires Ruby 3.2.0 or higher Jun 10, 2025
@acronhub acronhub force-pushed the require-ruby-3.2.8-or-higher branch from 9dec00e to 4960b13 Compare June 10, 2025 09:08
@acronhub acronhub force-pushed the require-ruby-3.2.8-or-higher branch from 4960b13 to 2172f35 Compare June 10, 2025 09:19
@acronhub
Copy link
Contributor Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the required Ruby version to >= 3.2.0. The changes are consistently applied across the gemspec, changelog, and README, and are technically sound.

@atm-snag2
Copy link

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the required Ruby version for the qiita gem to 3.2.0 or higher, modifying qiita.gemspec, README.md, and CHANGELOG.md accordingly. A suggestion is made for qiita.gemspec to use a more conservative version constraint for forward compatibility.

@@ -15,6 +15,8 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.required_ruby_version = '>= 3.2.0'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider using a pessimistic version constraint ~> 3.2 instead of '>= 3.2.0'. This specifies compatibility as >= 3.2.0 AND < 4.0.0, preventing unintended installations on potentially incompatible future major Ruby versions.

  spec.required_ruby_version = '~> 3.2'

Copy link

@atm-snag2 atm-snag2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@acronhub acronhub merged commit aa4c0d4 into master Jun 11, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants